{ if $ajax != 'true' }
<header>
    <h1>Liste des relevés</h1>
</header>

<div class="list">
    <table id="listing">
        { /if }
        <thead>
            <tr>
                <th>Produit</th>
                <th>Prix</th>
                <th>Magasin</th>
                <th>Ville</th>
            </tr>
        </thead>
        <tbody>
            { foreach from=$data item=element }
            <tr>
                <td>
                    <a href="{ $SYS_FOLDER }reports/{ $element->product->_id }-{ $element->product->name|replace:' ':'-' }">{ $element->product->name }</a>
                </td>
                <td>{ $element->prix } € / { $element->unite }</td>
                <td>
                    <a href="{ $SYS_FOLDER }stores/{ $element->magasin->_id }-{ $element->magasin->name|replace:' ':'-' }">{ $element->magasin->name }</a>
                </td>
                <td>
                    <a href="{ $SYS_FOLDER }ville/{ $element->magasin->ville.0 }-{ $element->magasin->ville.2|replace:' ':'-' }">{ $element->magasin->ville.2 }</a>
                </td>
            </tr>
        { /foreach }
        </tbody>
        <tfoot>
            <tr class="pagination">
                <td colspan="4">
                { section name=p start=$pageStart loop=$pageTotal }
                    { if $smarty.section.p.index <= $pageStop }
                        { if $page == $smarty.section.p.index }
                        { $smarty.section.p.index }
                        { else }
                        <a href="{ $SYS_FOLDER }reports/page-{ $smarty.section.p.index }">{ $smarty.section.p.index }</a>
                        { /if }
                    { /if }
                { /section }
                </td>
            </tr>
        </tfoot>
        { if $ajax != 'true' }
    </table>
</div>
{ /if }